package src;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2022-07-10
 * Time:15:26
 */
class Message<T> {
    private T message ;

    public T getMessage() {
        return message;
    }

    public void setMessage(T message) {
        this.message = message;
    }
}
public class TestDemo {
    public static void main(String[] args) {
        Message<String> message = new Message() ;
        message.setMessage("比特就业课欢迎您");
        fun(message);
        Message<Integer> message1 = new Message<>();
        message1.setMessage(100);
        fun(message1);
    }
    public static void fun(Message<?> temp){//'?':通配符
        System.out.println(temp.getMessage());
    }
}